import java.util.Arrays;

public class Test2 {
    public static void main1(String[] args) {
        int[][] arr1 = new int[][]{{1,2,3},{4,5,6}};
        int[][] arr2 = new int[2][3];
        int[][] arr3 = {{11,22,33},{44,55,66}};
    }

    public static void main(String[] args) {
        int[][] arr = new int[][]{{1,2,3},{4,5,6}};

//        //一个一个遍历
//        System.out.println(arr[0][0]);
//        System.out.println(arr[0][1]);
//
//        //for循环
//        for (int i = 0; i < arr.length; i++) {
//            for (int j = 0; j < arr[i].length; j++) {
//                System.out.print(arr[i][j]+" ");
//            }
//            System.out.println();
//        }
//
//        //foreach循环
//        for(int[] ret : arr){
//            for(int x:ret) {
//                System.out.print(x + " ");
//            }
//            System.out.println();
//        }

        //toString遍历
        System.out.println(arr);
        System.out.println(Arrays.deepToString(arr));
        System.out.println(Arrays.toString(arr));
    }

}
